# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.WalletObjects.V1.Model.Uri do
  @moduledoc """


  ## Attributes

  *   `description` (*type:* `String.t`, *default:* `nil`) - The URI's title appearing in the app as text. Recommended maximum is 20 characters to ensure full string is displayed on smaller screens. Note that in some contexts this text is not used, such as when `description` is part of an image.
  *   `id` (*type:* `String.t`, *default:* `nil`) - The ID associated with a uri. This field is here to enable ease of management of uris.
  *   `kind` (*type:* `String.t`, *default:* `nil`) - Identifies what kind of resource this is. Value: the fixed string `"walletobjects#uri"`.
  *   `localizedDescription` (*type:* `GoogleApi.WalletObjects.V1.Model.LocalizedString.t`, *default:* `nil`) - Translated strings for the description. Recommended maximum is 20 characters to ensure full string is displayed on smaller screens.
  *   `uri` (*type:* `String.t`, *default:* `nil`) - The location of a web page, image, or other resource. URIs in the `LinksModuleData` module can have different prefixes indicating the type of URI (a link to a web page, a link to a map, a telephone number, or an email address). URIs must have a scheme.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :description => String.t() | nil,
          :id => String.t() | nil,
          :kind => String.t() | nil,
          :localizedDescription => GoogleApi.WalletObjects.V1.Model.LocalizedString.t() | nil,
          :uri => String.t() | nil
        }

  field(:description)
  field(:id)
  field(:kind)
  field(:localizedDescription, as: GoogleApi.WalletObjects.V1.Model.LocalizedString)
  field(:uri)
end

defimpl Poison.Decoder, for: GoogleApi.WalletObjects.V1.Model.Uri do
  def decode(value, options) do
    GoogleApi.WalletObjects.V1.Model.Uri.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.WalletObjects.V1.Model.Uri do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
